# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgbase=scour
pkgname=('scour' 'python2-scour')
pkgver=0.37
pkgrel=3
pkgdesc='An SVG scrubber'
arch=('any')
url='https://github.com/codedread/scour'
license=('Apache')
makedepends=('git' 'python-setuptools' 'python-six' 'python2-setuptools' 'python2-six')
source=("git+https://github.com/scour-project/scour.git#tag=v${pkgver}")
sha256sums=('SKIP')

prepare() {
  cp -r {,python-}scour
  mv {,python2-}scour
}

build() {
  for py in python{,2}; do
    pushd ${py}-scour
    ${py} setup.py build
    popd
  done
}

package_scour() {
  depends=('python-setuptools' 'python-six')

  cd python-scour

  python setup.py install --root="${pkgdir}" --optimize='1' --skip-build
}

package_python2-scour() {
  depends=('python2-six')

  cd python2-scour

  python2 setup.py install --root="${pkgdir}" --optimize='1' --skip-build
  rm -rf "${pkgdir}"/usr/bin
}

# vim: ts=2 sw=2 et:
